<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组简介</title>
    <script>
        //创建数组对象
        var arr = new Array();

        //使用typeof检查数组
        console.log(typeof arr);//object

        //向数组添加元素
        arr [0] = 0 ;
        arr [1] = 5 ;
        arr [2] = 70;
        arr [3] = 90;
        arr [4] = 66;

        console.log(arr);

        //读取数组的元素
        console.log(arr [4]);

        //获取数组的长度
        console.log(arr.length)

        //向数组的最后一个位置添加元素
        arr[arr.length]=92;
        console.log(arr);


    </script>
</head>
<body>
    
</body>
</html>